<template>
  <!-- ContactUs 联系我们 -->
  <PageContainer>
    <view class="container">
      <Header title="联系我们" :is-go-back="true" />
      <TRichText :content="content" />
    </view>
  </PageContainer>
</template>

<script lang="ts" setup>
  /**  ContactUs  联系我们 */
  import PageContainer from '@/components/PageContainer/index.vue';
  import { getContactUs } from '@/api/mine';
  import Header from '@/components/Header/index.vue';
  import TRichText from '@/components/TRichText/index.vue';
  import { useAppStoreWithOut } from '@/store/modules/app';
  import { onShareAppMessage } from '@dcloudio/uni-app';
  import { ref } from 'vue';
  import { useAppShare } from '@/hooks/core/useAppShare';

  const { setWxSharePath } = useAppShare();
  const content = ref<string>();
  getContactUs().then((r) => {
    content.value = r;
  });

  const { globalConfig } = useAppStoreWithOut();
  onShareAppMessage(() => ({
    imageUrl: globalConfig?.comShareOptions.shareImg,
    path: setWxSharePath({ name: 'contactUs' }),
    title: '联系我们' || globalConfig?.comShareOptions.shareTitle,
  }));
</script>

<style lang="scss" scoped>
  .container {
    padding: 30rpx;
  }
</style>
